home *** CD-ROM | disk | FTP | other *** search
-
-
-
- KKKKIIIILLLLLLLL((((2222)))) KKKKIIIILLLLLLLL((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- kill - send a signal to a process or a group of processes
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssiiiiggggnnnnaaaallll....hhhh>>>>
-
- iiiinnnntttt kkkkiiiillllllll ((((ppppiiiidddd____tttt ppppiiiidddd,,,, iiiinnnntttt ssssiiiigggg))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _k_i_l_l sends a signal to a process or a group of processes. The process or
- group of processes to which the signal is to be sent is specified by _p_i_d.
- The signal that is to be sent is specified by _s_i_g and is either one from
- the list given in _s_i_g_n_a_l(2), or 0. If _s_i_g is 0 (the null signal), error
- checking is performed but no signal is actually sent. This can be used
- to check the validity of _p_i_d.
-
- The real or effective user ID of the sending process must match the real,
- saved, or effective user ID of the receiving process, unless the
- effective user ID of the sending process is super-user. An exception to
- this is the signal SSSSIIIIGGGGCCCCOOOONNNNTTTT, which may be sent to any descendant, or any
- process in the same session (having the same session ID) as the current
- process.
-
- The processes with a process ID of 0 and a process ID of 1 are special
- processes [see _i_n_t_r_o(2)] and will be referred to below as _p_r_o_c_0 and
- _p_r_o_c_1, respectively.
-
- If _p_i_d is greater than zero, _s_i_g will be sent to the process whose
- process ID is equal to _p_i_d. _P_i_d may equal 1.
-
- If _p_i_d is 0, _s_i_g will be sent to all processes excluding _p_r_o_c_0 and _p_r_o_c_1
- whose process group ID is equal to the process group ID of the sender.
-
- If _p_i_d is -1 and the effective user ID of the sender is not super-user,
- _s_i_g will be sent to all processes excluding _p_r_o_c_0 and _p_r_o_c_1 whose real
- user ID is equal to the effective user ID of the sender.
-
- If _p_i_d is -1 and the effective user ID of the sender is super-user, _s_i_g
- will be sent to all processes excluding _p_r_o_c_0 and _p_r_o_c_1.
-
- If _p_i_d is negative but not -1, _s_i_g will be sent to all processes whose
- process group ID is equal to the absolute value of _p_i_d.
-
- If the value of _p_i_d causes _s_i_g to be generated for the sending process,
- and if _s_i_g is not blocked for the calling thread and if no other thread
- has _s_i_g unblocked or is waiting in a _s_i_g_w_a_i_t function for _s_i_g, either _s_i_g
- or at least one pending unblocked signal shall be delivered to the
- calling thread before the _k_i_l_l() function returns.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- KKKKIIIILLLLLLLL((((2222)))) KKKKIIIILLLLLLLL((((2222))))
-
-
-
- _k_i_l_l will fail and no signal will be sent if one or more of the following
- are true:
-
- [EINVAL] _S_i_g is not a valid signal number.
-
- [EPERM] _S_i_g is SIGKILL and _p_i_d is 1 (proc1).
-
- [ESRCH] No process can be found corresponding to that specified by
- _p_i_d.
-
- [ESRCH] The process group was given as 0 but the sending process
- does not have a process group.
-
- [EPERM] The user ID of the sending process is not super-user, and
- its real or effective user ID does not match the real,
- saved, or effective user ID of the receiving process.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- kill(1), exec(2), getpid(2), setpgrp(2), setsid(2), signal(2), sigset(2),
- sigaction(2), sigprocmask(2), sigqueue(3), sigwait(3), sigvec(3B),
- sigblock(3B), sigsetmask(3B), killpg(3B), pthread_kill(3P)
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCC
- Upon successful completion, a value of 0 is returned. Otherwise, a value
- of -1 is returned and _e_r_r_n_o is set to indicate the error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-